/*------------------------------------------------------------------------------
 * Copyright 2012 NCR Corporation
 *------------------------------------------------------------------------------
 * All revision information is updated automatically from source code control
 * change records - please do not manually edit.
 *------------------------------------------------------------------------------
 *
 * $LastChangedRevision:: 2123                                     $
 * $LastChangedBy:: rb250096                                       $
 * $LastChangedDate:: 2012-04-18 00:43:25 -0400 (Wed, 18 Apr 2012) $
 */

package com.ncr.nep.dashboardcore.modularization.client;

import com.ncr.nep.dashboardcore.utils.client.InterWindowMessage;

/**
 * Message sent from a child pod to its parent containing the size of the
 * pod's content.  This is needed for pods hosted in iframes.
 *
 * @author rb250096
 * @version $Revision: 2123 $
 */
public class FrameSizeMessage extends InterWindowMessage {

    //--------------------------------------------------------------------------
    //
    //  Constructors
    //
    //--------------------------------------------------------------------------

    /**
     * Constructor
     */
    protected FrameSizeMessage() { }

    //--------------------------------------------------------------------------
    //
    //  Properties
    //
    //--------------------------------------------------------------------------

    /**
     * Gets the width of the frame.
     *
     * @return The width in pixels.
     */
    public final native int getWidth() /*-{
        return this.width;
    }-*/;

    /**
     * Sets the width of the frame.
     *
     * @param width The width in pixels.
     */
    public final native void setWidth(int width) /*-{
        this.width = width;
    }-*/;

    /**
     * Gets the height of the frame.
     *
     * @return The height in pixels.
     */
    public final native int getHeight() /*-{
        return this.height;
    }-*/;

    /**
     * Sets the height of the frame.
     *
     * @param height The height in pixels.
     */
    public final native void setHeight(int height) /*-{
        this.height = height;
    }-*/;

    //--------------------------------------------------------------------------
    //
    //  Methods
    //
    //--------------------------------------------------------------------------

    /**
     * Creates a new message object.
     *
     * @return The new message object.
     */
    public static native FrameSizeMessage newMessage() /*-{
        return {
            type: "__frameSize"
        };
    }-*/;
}
